﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel.Composition;
using Microsoft.Practices.Prism.Regions;

namespace EIA.SLClient.ProjectManage.Basic
{
    [Export]
    [ViewSortHint("01")]
    public partial class ProjectInfoNavgationItemView : UserControl, SimpleMvvmToolkit.INotifyable
    {
        public ProjectInfoNavgationItemView()
        {
            // 为初始化变量所必需
            InitializeComponent();

            SimpleMvvmToolkit.MessageBus.Default.Register(EIA.SLClient.ProjectManage.Infrastructure.MessageTokens.PROJECT_DETAIL_SHOW, this);
        }

        [Import]
        public IRegionManager RegionManager { get; set; }

        private void RadioButton_Checked(object sender, System.Windows.RoutedEventArgs e)
        {
            RegionManager.RequestNavigate(EIA.SLClient.ProjectManage.Infrastructure.RegionNames.ProjectMainRegion, typeof(ProjectInfoView).FullName);
        }


        public void Notify(string token, object sender, SimpleMvvmToolkit.NotificationEventArgs e)
        {
            switch (token)
            {
                case EIA.SLClient.ProjectManage.Infrastructure.MessageTokens.PROJECT_DETAIL_SHOW:
                    rb_basic_info.IsChecked = true;
                    break;
            }
        }
    }
}